﻿@model ExcellOnServices.Models.Service

@{
	ViewBag.Title = "Edit";
	Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}

<div class="panel panel-primary">
	<div class="panel-heading">Edit Service</div>
	@using (Html.BeginForm("Edit", "Services", FormMethod.Post, new { enctype = "multipart/form-data" })) {
		<div class="panel-body">

			@Html.AntiForgeryToken()

			<div class="form-horizontal">
				@Html.ValidationSummary(true)
				@Html.HiddenFor(model => model.Id)

				<div class="form-group">
					@Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
					<div class="col-md-10">
						@Html.TextBoxFor(model => model.Name, new { @class = "form-control" })
						@Html.ValidationMessageFor(model => model.Name)
					</div>
				</div>

				<div class="form-group">
					@Html.LabelFor(model => model.Description, new { @class = "control-label col-md-2" })
					<div class="col-md-10">
						@Html.TextAreaFor(model => model.Description, new { @class = "form-control mceEditor" })
						@Html.ValidationMessageFor(model => model.Description)
					</div>
				</div>

				<div class="form-group">
					@Html.LabelFor(model => model.Price, new { @class = "control-label col-md-2" })
					<div class="col-md-10">
						@Html.TextBoxFor(model => model.Price, new { @class = "form-control" })
						@Html.ValidationMessageFor(model => model.Price)
					</div>
				</div>

				<div class="form-group">
					@Html.LabelFor(model => model.ImageUrl, new { @class = "control-label col-md-2" })
					<div class="col-md-10">
						@Html.TextBoxFor(model => model.ImageUrl, new { @type = "file"})
						@Html.ValidationMessageFor(model => model.ImageUrl)
					</div>
				</div>
			</div>
		</div>
		<div class="panel-footer">
			<input type="submit" value="Save" class="btn btn-primary" />
			@Html.ActionLink("Back to List", "Index", null, new { @class = "btn btn-primary btn-sm" })
		</div>
	}
</div>

@section Scripts {
	@Scripts.Render("~/bundles/jqueryval")
}
